package JavaUtils.web.req;

import JavaUtils.web.IWebCallback;
import JavaUtils.web.req.io.Req_directory;
import JavaUtils.web.req.io.Req_fileRead;
import JavaUtils.web.req.io.Req_fileSave;
import JavaUtils.web.req.io.Req_fileUpload;

import java.util.Map;

public class WebReq_Register {

    public static void Register(Map<String, IWebCallback> eventMap) {
        eventMap.put("/Directory.GetFiles", Req_directory.GetFiles());
        eventMap.put("/File.ReadAllTxt", Req_fileRead.ReadAllTxt());
        eventMap.put("/File.ReadAllBytes", Req_fileRead.ReadAllBytes());

        IWebCallback fileUploadEvent = Req_fileUpload.fileUpload();
        eventMap.put("/File.WriteAllText", fileUploadEvent);
        eventMap.put("/FileUpload", fileUploadEvent);
        eventMap.put("/File.WriteAllBytes", Req_fileSave.WriteAllBytes());
    }
}
